<template>
    <div class="page">
      <nav-com title="转赠记录" :showView="true" @back="backHandler()"></nav-com>
      <div style="background-color: white;border-radius: 10px;margin: 10px 15px;margin-bottom: 20px;" v-for="(item,index) in list">
         <div style="border-bottom:1px solid #DCDCDC;line-height: 50px;padding-left: 10px;color: #808080;">{{item.createtime}}</div>
         <div style="padding:10px;display: flex;">
           <div style="line-height:30px">
              <div>类型:{{item.memo}}</div>
              <div>时间:{{item.createtime}}</div>
              <div>对方信息:{{item.mobile}}</div>
           </div>
           <div v-if="item.memo=='增加'" style="flex: 1;font-size:20px;align-items: center;justify-content: flex-end; display: flex;color: #DE1C1C;">
            +{{item.score}}
           </div>
           <div v-else style="flex: 1;font-size:20px;align-items: center;justify-content: flex-end; display: flex;">
            -{{item.score}}
           </div>
         </div>
      </div>
    </div>
  </template>
      
      <script>
  import navCom from "@/component/nav";
  import { Toast, RadioGroup, Radio, Field } from "vant";
  import {
    getuserInfo,
    scoreWithdrawal,my_score_log
  } from "@/api/api";
  import Loading from "@/component/loading";
  export default {
    name: "transferList",
    components: {
      navCom,
      Loading,
    },
    data() {
      return {
        mobile: "",
        money: "",
        score: "",
        radio: "1",
        list:[],
        shareUser:JSON.parse(localStorage.getItem("shareUser")),
        LOADING: false,
      };
    },
    mounted() {
      this.getmyScoreLog();
    },
    methods: {
      backHandler() {
        this.$router.go(-1);
      },
      getmyScoreLog() {
        my_score_log().then((res) => {
          console.log("my_score_log", res);
          if (res.data.code == 1) {
            this.list = res.data.data;
          }
        });
      },
    },
  };
  </script>
 <style scoped>
  body {
    /* background-color: #ffffff; */
  }
  .page {
    width: 100vw;
    height: 100vh;
    background-color: #F2F3F7;
  }
  .btn {
    width: 50.6vw;
    height: 13.3vw;
    background: #f86830;
    margin: 0 auto;
    font-size: 4.5vw;
    text-align: center;
    line-height: 13.3vw;
    margin-top: 10vw;
    font-family: PingFangSC-Medium, PingFang SC;
    /*font-weight: 500;*/
    color: #ffffff;
    border-radius: 50px;
  }
  .label {
    font-size: 4.5vw;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #333333;
  }
  .van-cell {
    box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.14);
    border-radius: 8px;
    margin-bottom: 15px;
  }
  </style>